package day213;

import javax.swing.*;

public class MyJFrame {
    public static void main(String[] args) {
        JFrame frame = new JFrame();
        JPanel panel = new JPanel();
        frame.add(panel);
        frame.setSize(480,800);
        frame.setLocationRelativeTo(null);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
        JLabel background = new JLabel(new ImageIcon("res/背景.jpg"));
        panel.setLayout(null);
        background.setSize(480,800);
        panel.add(background);
        JButton card0 = new JButton(new ImageIcon("res/兔子.png"));
        card0.setSize(50,50);
        card0.setLocation(40,40);
        panel.add(card0,0);





    }
}
